<html>
<?php


$myFile = "testFile.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "Bobby Bopper\n";
fwrite($fh, $stringData);
$stringData = "\n Tracy Tanner\n";
fwrite($fh, $stringData);
fclose($fh); 

$fh2 = fopen($myFile, 'r');
$theData = fread($fh2, 5);
fclose($fh2);
echo $theData;

$fh3 = fopen($myFile, 'r');
$theData3 = fread($fh3, filesize($myFile));
fclose($fh3);
echo $theData3;

$fh4 = fopen($myFile, 'r');
$theData4 = fgets($fh4);
fclose($fh4);
echo $theData4;

//$myFile = "testFile.txt";
//unlink($myFile);


$fh5 = fopen($myFile, 'a') or die("can't open file");
$stringDataN = "\r\nNew Stuff 1 ";
fwrite($fh5, $stringDataN);
$stringDataN = "\r\nNew Stuff 2 \r\n";
fwrite($fh5, $stringDataN);
fclose($fh5);
?>
</html>